using System;

namespace Atomic.Libraries.Mathematics.RandomNumbers
{
	[Serializable]
	public sealed class MersenneTwister53 : IRandomGenerator
	{
		private MersenneTwister mersenneTwister;

		public MersenneTwister53()
		{
			mersenneTwister = new MersenneTwister();
		}

		public MersenneTwister53(uint seed)
		{
			mersenneTwister = new MersenneTwister(seed);
		}

		public int Next()
		{
			return mersenneTwister.Next();
		}

		public int Next(int maxValue)
		{
			return mersenneTwister.Next(maxValue);
		}
		
		public int Next(int minValue, int maxValue)
		{
			return mersenneTwister.Next(minValue, maxValue);
		}

		public double NextDouble()
		{
			return mersenneTwister.NextDouble53();
		}
	}
}
